Die Function
18.4 handle errors
In many cases, system calls may fail. For example, you can try to open a non-existing file, delete a directory that still contains the file, or
Try to read files without read permission. In the previous example, we
Http://www.alfajango.com/blog/exploring-jquery-live-and-die/
Many developers know jquery's. Live () method. Most of them know what this function is doing, but they do not know how it is implemented, so it is not so comfortable to use. They have
PHP supports an error control operator: @. Any error messages that may be generated by the expression are ignored until it is placed in a PHP expression.
If a custom error handler is set with Set_error_handler (), it will still be called, but this
Many developers know jQuery's. live () method. Most of them know what this function is doing, but they do not know how it is implemented, so it is not so comfortable to use. They have never heard of the. die () method for unbinding. live () events.
What is. Live ()The live method is similar to. bind (), which, in addition, allows you to bind events to DOM elements, and you can bind events to elements that do not yet exist in the DOM, and look at the following example:
For example, when the
What is. live (). The live method is similar. bind (). In addition, it allows you to bind events to DOM elements. You can bind events to elements that do not exist in the DOM. Take a look at the following example:
For example, when a user clicks a
Die ()If you know. Bind (), then you must know. Unbind (). So,. Die () and. Live () are similar relationships. To get in touch with the above bindings (the pop-up dialog box does not want the user to click on the link), we do this:Copy code code as
Often see this statement: $file = fopen ($filename, ' r ') or Die ("Sorry, unable to open: $filename");
Or is understood here, because the data type is not differentiated in PHP, so the $file can be either int or bool, so the statement does not
In my previous post we looked at different categories of ClassLoader leaks, and looked at a particular example of a refere nCE from outside the Web application ClassLoader (a JVM shutdown hooks pointing to a JAI class).In this post we'll look at
Summed up the beauty of this Amoy station, the user group, mainly distributed in:
1, QQ (QQ space, friends, Tencent Weibo), 2, Taobao (CAT), 3, Sina Weibo; 4, Baidu;
We know that the Alexa flow algorithm from the browser on the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.